package library.service.impl;

import library.dao.UserDao;
import library.domain.User;
import library.exception.DataException;
import library.service.ServiceImpl;
import library.service.UserService;

public class UserServiceImpl extends ServiceImpl implements UserService {

    @Override
    public User findUser(String login, String password) throws DataException {       
        UserDao userDao = daoManager.createDao(UserDao.class);        
        return userDao.read(login, password);
    }

    @Override
    public User getUser(Integer identity) throws DataException {
        UserDao userDao = daoManager.createDao(UserDao.class);
        return userDao.read(identity);
    }

}
